<?php
declare(strict_types=1);
namespace Field;

class OneBlackWordConst
{
    public const pk='';
    public const index=[];
	public const fields=['bizCode','campaignId','adgroupId','gmtCreate','gmtModified','campaignBidType','displayStatus','adgroupName','faultName','enableColdSpeedNewItem','enableOcpc','ocpcStatus','ocpcRatio','ocpcMarketingAim','materialId','bidwordCount','adRotation','auditStatus','imgUrl','linkUrl','categoryId','firstCatId','categoryNameList','onlineStatus'];
	public const comment=['bizCode'=>'','campaignId'=>'','adgroupId'=>'','gmtCreate'=>'','gmtModified'=>'','campaignBidType'=>'','displayStatus'=>'','adgroupName'=>'','faultName'=>'','enableColdSpeedNewItem'=>'','enableOcpc'=>'','ocpcStatus'=>'','ocpcRatio'=>'','ocpcMarketingAim'=>'','materialId'=>'','bidwordCount'=>'','adRotation'=>'','auditStatus'=>'','imgUrl'=>'','linkUrl'=>'','categoryId'=>'','firstCatId'=>'','categoryNameList'=>'','onlineStatus'=>''];
	/*
    * @Field bizCode
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const bizCode = 'bizCode';
    /*
    * @Field campaignId
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const campaignId = 'campaignId';
    /*
    * @Field adgroupId
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const adgroupId = 'adgroupId';
    /*
    * @Field gmtCreate
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const gmtCreate = 'gmtCreate';
    /*
    * @Field gmtModified
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const gmtModified = 'gmtModified';
    /*
    * @Field campaignBidType
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const campaignBidType = 'campaignBidType';
    /*
    * @Field displayStatus
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const displayStatus = 'displayStatus';
    /*
    * @Field adgroupName
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const adgroupName = 'adgroupName';
    /*
    * @Field faultName
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const faultName = 'faultName';
    /*
    * @Field enableColdSpeedNewItem
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const enableColdSpeedNewItem = 'enableColdSpeedNewItem';
    /*
    * @Field enableOcpc
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const enableOcpc = 'enableOcpc';
    /*
    * @Field ocpcStatus
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const ocpcStatus = 'ocpcStatus';
    /*
    * @Field ocpcRatio
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const ocpcRatio = 'ocpcRatio';
    /*
    * @Field ocpcMarketingAim
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const ocpcMarketingAim = 'ocpcMarketingAim';
    /*
    * @Field materialId
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const materialId = 'materialId';
    /*
    * @Field bidwordCount
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const bidwordCount = 'bidwordCount';
    /*
    * @Field adRotation
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const adRotation = 'adRotation';
    /*
    * @Field auditStatus
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const auditStatus = 'auditStatus';
    /*
    * @Field imgUrl
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const imgUrl = 'imgUrl';
    /*
    * @Field linkUrl
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const linkUrl = 'linkUrl';
    /*
    * @Field categoryId
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const categoryId = 'categoryId';
    /*
    * @Field firstCatId
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const firstCatId = 'firstCatId';
    /*
    * @Field categoryNameList
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const categoryNameList = 'categoryNameList';
    /*
    * @Field onlineStatus
    * @Type varchar(255)
    * @Collation utf8mb4_general_ci
    * @Null YES
    * @Key 
    * @Default 
    * @Extra 
    * @Privileges select,insert,update,references
    * @Comment 
    */
    public const onlineStatus = 'onlineStatus';
}

class OneBlackWordColumns
{
public  ?string $bizCode='';
   public  ?string $campaignId='';
   public  ?string $adgroupId='';
   public  ?string $gmtCreate='';
   public  ?string $gmtModified='';
   public  ?string $campaignBidType='';
   public  ?string $displayStatus='';
   public  ?string $adgroupName='';
   public  ?string $faultName='';
   public  ?string $enableColdSpeedNewItem='';
   public  ?string $enableOcpc='';
   public  ?string $ocpcStatus='';
   public  ?string $ocpcRatio='';
   public  ?string $ocpcMarketingAim='';
   public  ?string $materialId='';
   public  ?string $bidwordCount='';
   public  ?string $adRotation='';
   public  ?string $auditStatus='';
   public  ?string $imgUrl='';
   public  ?string $linkUrl='';
   public  ?string $categoryId='';
   public  ?string $firstCatId='';
   public  ?string $categoryNameList='';
   public  ?string $onlineStatus='';
	public function toArray():array
	{
		return [
'bizCode'=>$this->bizCode,
    'campaignId'=>$this->campaignId,
    'adgroupId'=>$this->adgroupId,
    'gmtCreate'=>$this->gmtCreate,
    'gmtModified'=>$this->gmtModified,
    'campaignBidType'=>$this->campaignBidType,
    'displayStatus'=>$this->displayStatus,
    'adgroupName'=>$this->adgroupName,
    'faultName'=>$this->faultName,
    'enableColdSpeedNewItem'=>$this->enableColdSpeedNewItem,
    'enableOcpc'=>$this->enableOcpc,
    'ocpcStatus'=>$this->ocpcStatus,
    'ocpcRatio'=>$this->ocpcRatio,
    'ocpcMarketingAim'=>$this->ocpcMarketingAim,
    'materialId'=>$this->materialId,
    'bidwordCount'=>$this->bidwordCount,
    'adRotation'=>$this->adRotation,
    'auditStatus'=>$this->auditStatus,
    'imgUrl'=>$this->imgUrl,
    'linkUrl'=>$this->linkUrl,
    'categoryId'=>$this->categoryId,
    'firstCatId'=>$this->firstCatId,
    'categoryNameList'=>$this->categoryNameList,
    'onlineStatus'=>$this->onlineStatus,        ];
	}
}

class OneBlackWordRow
{
	public OneBlackWordColumns $data;
	public function toArray():array
	{
		return $this->data->toArray();
    }

    public function getValue(string $field):string|int|null
    {
        return match ($field){
        'bizCode' => $this->data->bizCode,
        'campaignId' => $this->data->campaignId,
        'adgroupId' => $this->data->adgroupId,
        'gmtCreate' => $this->data->gmtCreate,
        'gmtModified' => $this->data->gmtModified,
        'campaignBidType' => $this->data->campaignBidType,
        'displayStatus' => $this->data->displayStatus,
        'adgroupName' => $this->data->adgroupName,
        'faultName' => $this->data->faultName,
        'enableColdSpeedNewItem' => $this->data->enableColdSpeedNewItem,
        'enableOcpc' => $this->data->enableOcpc,
        'ocpcStatus' => $this->data->ocpcStatus,
        'ocpcRatio' => $this->data->ocpcRatio,
        'ocpcMarketingAim' => $this->data->ocpcMarketingAim,
        'materialId' => $this->data->materialId,
        'bidwordCount' => $this->data->bidwordCount,
        'adRotation' => $this->data->adRotation,
        'auditStatus' => $this->data->auditStatus,
        'imgUrl' => $this->data->imgUrl,
        'linkUrl' => $this->data->linkUrl,
        'categoryId' => $this->data->categoryId,
        'firstCatId' => $this->data->firstCatId,
        'categoryNameList' => $this->data->categoryNameList,
        'onlineStatus' => $this->data->onlineStatus, default=>null
        };
    }

    public function __construct(array $data)
    {
        $this->data = new OneBlackWordColumns();
        isset($data['bizCode']) && $this->data->bizCode = (string)$data['bizCode'];
           isset($data['campaignId']) && $this->data->campaignId = (string)$data['campaignId'];
           isset($data['adgroupId']) && $this->data->adgroupId = (string)$data['adgroupId'];
           isset($data['gmtCreate']) && $this->data->gmtCreate = (string)$data['gmtCreate'];
           isset($data['gmtModified']) && $this->data->gmtModified = (string)$data['gmtModified'];
           isset($data['campaignBidType']) && $this->data->campaignBidType = (string)$data['campaignBidType'];
           isset($data['displayStatus']) && $this->data->displayStatus = (string)$data['displayStatus'];
           isset($data['adgroupName']) && $this->data->adgroupName = (string)$data['adgroupName'];
           isset($data['faultName']) && $this->data->faultName = (string)$data['faultName'];
           isset($data['enableColdSpeedNewItem']) && $this->data->enableColdSpeedNewItem = (string)$data['enableColdSpeedNewItem'];
           isset($data['enableOcpc']) && $this->data->enableOcpc = (string)$data['enableOcpc'];
           isset($data['ocpcStatus']) && $this->data->ocpcStatus = (string)$data['ocpcStatus'];
           isset($data['ocpcRatio']) && $this->data->ocpcRatio = (string)$data['ocpcRatio'];
           isset($data['ocpcMarketingAim']) && $this->data->ocpcMarketingAim = (string)$data['ocpcMarketingAim'];
           isset($data['materialId']) && $this->data->materialId = (string)$data['materialId'];
           isset($data['bidwordCount']) && $this->data->bidwordCount = (string)$data['bidwordCount'];
           isset($data['adRotation']) && $this->data->adRotation = (string)$data['adRotation'];
           isset($data['auditStatus']) && $this->data->auditStatus = (string)$data['auditStatus'];
           isset($data['imgUrl']) && $this->data->imgUrl = (string)$data['imgUrl'];
           isset($data['linkUrl']) && $this->data->linkUrl = (string)$data['linkUrl'];
           isset($data['categoryId']) && $this->data->categoryId = (string)$data['categoryId'];
           isset($data['firstCatId']) && $this->data->firstCatId = (string)$data['firstCatId'];
           isset($data['categoryNameList']) && $this->data->categoryNameList = (string)$data['categoryNameList'];
           isset($data['onlineStatus']) && $this->data->onlineStatus = (string)$data['onlineStatus'];
    }
}
?>